#  Copyright (c) 2023. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#  Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
#  Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
#  Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
#  Vestibulum commodo. Ut rhoncus gravida arcu.

# coding:utf8

def get_class_attrs_without_(class_class, if_value_tuple = True):
    attrs = []
    for attr_str in dir(class_class):
        if attr_str.startswith("__"):
            continue
        if if_value_tuple:
            ifvalue =  class_class.__dict__.get(attr_str)
            if not isinstance(ifvalue, tuple):
                continue
        attrs.append(attr_str)
    return attrs

def get_attrs_filter_name(self, cls_cls, part_name: str):
    """
    返回 Localtors 属性中含有 part_name 的 属性
    
    """
    attrs_part = []
    for attr in self._get_class_attrs_without_(cls_cls):
        if part_name in attr:
            attrs_part.append(attr)
    return attrs_part